# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=waidps
pkgver=16.ff8d270
pkgrel=6
groups=('blackarch' 'blackarch-wireless')
pkgdesc='Wireless Auditing, Intrusion Detection & Prevention System.'
arch=('any')
url='https://github.com/SYWorks/waidps'
license=('GPL3')
depends=('python2' 'python2-pycryptodome')
makedepends=('git')
source=('git+https://github.com/SYWorks/waidps.git')
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  # it supports py3 but let's stick first with py2...
  sed -i 's|/usr/bin/python|/usr/bin/python2|' waidps.py
}

package() {
  cd $pkgname

  install -Dm 755 waidps.py "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

